<!--
*@Author: QWP
*@Description: 金额输入框
*@Date 2023-06-18 12:01
-->
<template>
  <a-input-number
    v-bind="$attrs"
    :controls="$attrs['controls'] ? $attrs['controls'] : false"
    :formatter="value => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
    :parser="value => value.replace(/\$\s?|(,*)/g, '')"
    :precision="$attrs['precision'] || 2"
  >
</a-input-number>
</template>

<script lang='ts' setup>
defineOptions({
  name: 'u-money-input'
})
import { ref, reactive } from 'vue' 
import { formatAmt } from '@/util/format.ts'
import { numberC } from '@/util/common';

</script>

<style lang='scss' scoped>
</style>
